package ui.scene
{
	import flash.display.Bitmap;

	import globals.Global;

	import ui.face.Bar;
	import ui.scene.battle.SkillItem;

	/**战斗场景**/
	public class BattleScene extends BaseScene
	{
		private var _bloodBar:Bar;
		private var _magicBar:Bar;
		private var _skillItems:Vector.<SkillItem> = new Vector.<SkillItem>;

		public function BattleScene()
		{
			super();
			addChildren();
		}

		private function addChildren():void
		{
			var bg:Bitmap = new Bitmap(Global.assetsManager.getAssetsAsBitmapData("battle_info_bg", "ui"));
			this.addChild(bg);
			_bloodBar = new Bar("blood_bar_front", "battle_bar_bg", true);
			_bloodBar.x = 25;
			_bloodBar.y = 15;
			this.addChild(_bloodBar);
			_magicBar = new Bar("magic_bar_front", "battle_bar_bg", true);
			_magicBar.x = 135;
			_magicBar.y = 15;
			this.addChild(_magicBar);
			var heartIcon:Bitmap = new Bitmap(Global.assetsManager.getAssetsAsBitmapData("battle_blood_icon"));
			heartIcon.x = 3;
			heartIcon.y = 5;
			this.addChild(heartIcon);
			var magicIcon:Bitmap = new Bitmap(Global.assetsManager.getAssetsAsBitmapData("battle_magic_icon"));
			magicIcon.x = 120;
			magicIcon.y = 5;
			this.addChild(magicIcon);
			var bitmap:Bitmap;
			bitmap = new Bitmap(Global.assetsManager.getAssetsAsBitmapData("money_bg"));
			bitmap.x = 285;
			bitmap.y = 10;
			this.addChild(bitmap);
			bitmap = new Bitmap(Global.assetsManager.getAssetsAsBitmapData("silver_icon"));
			bitmap.x = 262;
			this.addChild(bitmap);
			bitmap = new Bitmap(Global.assetsManager.getAssetsAsBitmapData("battle_skill_list_bg"));
			bitmap.y = 500;
			this.addChild(bitmap);

			for(var i:int = 0; i < 8; i++)
			{
				var item:SkillItem = new SkillItem();
				item.x = 46 + i * 82;
				item.y = 516;
				this.addChild(item);
				_skillItems.push(item);
			}
		}

		override public function enter():void
		{
		}

		override public function exit():void
		{
		}

		override public function clear():void
		{
		}
	}
}